<?php
list($g_usec, $g_sec) = explode(" ",microtime());
define ("t_start", (float)$g_usec + (float)$g_sec);
?>
<?php defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php if ( $my->id ) { initEditor(); } ?>
<meta http-equiv="Content-Type" content="text/html;><?php echo _ISO; ?>" />
<?php mosShowHead(); ?>
<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate() ?>/css/template_css.css" rel="stylesheet" type="text/css"/>
<link rel="shortcut icon" href="<?php echo $mosConfig_live_site;?>/images/favicon.ico"/>
</head>
<body>
<div id="wrapper">
	<div id="header">
		<div id="logo">
			<h1><?php echo $mosConfig_live_site; ?></h1>
		</div>
	</div>
	<div id="top">
	<?php if (mosCountModules('top')) mosLoadModules('top', -2); ?>
	</div>
	<div id="page">
		<div id="sidebar">
			<div id="menu">
				<?php mosLoadModules ( 'left', -2 ); ?>
			</div>
		
		</div>
		<div id="content">
		<?php 
			if (
			mosCountModules('user1') ||
			mosCountModules('user2') ||
			mosCountModules('user6') ||
			mosCountModules('user4') ||
			mosCountModules('user5') 
			) {
		?>
			<table class="userblock" cellspacing="0" cellpadding="0" width="100%">
			<?php
			if (
			mosCountModules('user1') ||
			mosCountModules('user2')
				)
			{
			?>
				<tr valign="top">
					<?php if (mosCountModules('user1')) : ?>
					<td class="user" width="50%">
						<?php mosLoadModules('user1', -2); ?>
					</td>
					<?php endif; ?>
					<?php if (mosCountModules('user1') and mosCountModules('user2')) : ?>
					<td class="spacer">&nbsp;</td>
					<?php endif; ?>
					<?php if (mosCountModules('user2')) : ?>
					<td class="user" width="50%">
						<?php mosLoadModules('user2', -2); ?>
					</td>
					<?php endif; ?>
				</tr>
			<?php
			} 
			?>
			<?php
			if (
			mosCountModules('user6')
				)
			{
			?>
				<tr valign="top">
					<td class="user" colspan="2">
						<?php mosLoadModules('user6', -2); ?>
					</td>
				</tr>
			<?php
			} 
			?>
			<?php
			if (
			mosCountModules('user4') ||
			mosCountModules('user5')
				)
			{
			?>
				<tr valign="top">
					<?php if (mosCountModules('user4')) : ?>
					<td class="user" width="50%">
						<?php mosLoadModules('user4', -2); ?>
					</td>
					<?php endif; ?>
					<?php if (mosCountModules('user4') and mosCountModules('user5')) : ?>
					<td class="spacer">&nbsp;</td>
					<?php endif; ?>
					<?php if (mosCountModules('user5')) : ?>
					<td class="user" width="50%">
						<?php mosLoadModules('user5', -2); ?>
					</td>
					<?php endif; ?>
				</tr>
			<?php
			} 
			?>
			</table>

		<?php
			}
			if($_REQUEST['option'] && $_REQUEST['option'] != 'com_frontpage') {
				mosMainbody(); 
			}
		?>
		</div>
		<div class="clear"></div>
	</div>
	<div id="footer">
	(C) <?php echo  date("Y") ;?> Eugene Heriniaina - Tsiky dia ampy - Tel. +39 338 744 2412 (Italia)
	<?php
	list($g_usec, $g_sec) = explode(" ",microtime());
	define ("t_end", (float)$g_usec + (float)$g_sec);

	$t_speed = t_end - t_start;

	echo "<br />Page load : " . round($t_speed, 2) ;
	?>
	<?php mosLoadModules( 'debug', -1 );?>
	</div>
</div>
</body>
</html>
